import Layout from "../components/Layout"
import Default from '../views/Default.vue'
import Detail from '../views/commodityDetail.vue'
import Cart from "../views/Cart"
import GotoCart from "../views/GotoCart"
import Try from "../try.vue"
import Pay from '../views/pay.vue'

let routes = [
    {
        path:"/",
        component:Layout,
        title:"默认首页",
        redirect:{
            path:'/default'
        },
        children:[
            {
                path:"default",
                component:Default
            },{
                path:'/datail/:id',
                component:Detail,
            },{
                path:"/Cart",
                name:"Cart",
                component:Cart,
            },
            {
                path:"/GotoCart",
                name:"GotoCart",
                component:GotoCart
            },
            {
                path:'/pay',
                component:Pay
            }
        ],
        
    },
    {
        path:"/try",
        component:Try
    },
   
    
    

]

export default routes